<template>
  <div class="list">
    <fanhui></fanhui>
    <van-card
      v-for="item in Cumulativelist"
      :key="item.id"
      :desc="item.createDay"
      :title="item.title"
    >

      <template #num>
        <div class="num">
          +{{item.number}}
        </div>
      </template>
    </van-card>
  </div>
</template>
<script>
import fanhui from "../fanhui/fanhui.vue"
export default {
  data() {
    return {
      token:localStorage.token,
      // 获取累计签到天数数据
      Cumulativelist: [],
    };
  },
  methods: {
    async getCumulative() {
      const res = await this.$http.Cumulative(this.token);
      console.log(res);
      this.Cumulativelist = res.data.data.list;
    },
  },
  created(){
    this.getCumulative()
  },
  components:{
    fanhui
  }
};
</script>
<style lang="scss">
.list {
  text-align: left;

  .num {
    font-size: 24px;
    color: yellowgreen;
  }
}
</style>